
// 写在两个模块中
// import { addListen } from "./observe_listen.js";
// import { addTrigger } from "./observe_trigger.js";

// addListen()
// addTrigger()


import myEvent from "./observe.js";

var div = document.getElementById("showcount");
myEvent.listen('add',function(count){
  console.log('add listen is called,args is '+count)
});

var showFun = function(){
  console.log('show listen is called')
}

myEvent.listen('show',showFun);

var count = 0;
myEvent.trigger("add",count++);
myEvent.trigger("add",count++);


myEvent.remove('show',showFun)

myEvent.trigger('show',count)

